package cn.com.Kol.ITPMP.System;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();

        if (str.equals("0 0")) {
            System.out.print("0 0");
        } else {
            //Solution
            String split[] = str.split(" ");
            int num[] = new int[split.length];
            int i;
            for (i = 0; i < split.length; i++) {
                num[i] = Integer.parseInt(split[i]);
            }

            int out[] = new int[num.length];

            for (i = 0; i < out.length; i += 2) {
                out[i] = num[i] * num[i + 1];
                out[i + 1] = num[i + 1] - 1;
            }


//            for (i = 0; i < out.length; i++) {
//                System.out.print(out[i] + " ");
//            }
//            System.out.println(" ");


            if (out[out.length - 2] == 0) {
                if (out.length == 2) {
                    System.out.print("0 0");
                } else {
                    for (i = 0; i < out.length - 4; i += 2) {
                        System.out.print(out[i] + " " + out[i + 1] + " ");
                    }
                    System.out.print(out[out.length - 4] + " " + out[out.length - 3]);
                }

            } else {
                for (i = 0; i < out.length - 2; i += 2) {
                    if (out[i] != 0) {
                        System.out.print(out[i] + " " + out[i + 1] + " ");
                    }
                }
                System.out.print(out[out.length - 2] + " " + out[out.length - 1]);
            }


        }


    }
}
